.\"   $Id: lofigchain.3,v 1.1 2002/03/08 13:51:02 fred Exp $
.\" @(#)lofigchain.2 2.11 91/08/22 ; Labo masi cao-vlsi; Author : Frederic Petrot
.if t \{\
.so man1/alc_contents.mac
.XS \n%
.ti 0.2i
lofigchain
.XE
.XS2 \n%
.ti 0.2i
lofigchain
.XE2 \}
.TH LOFIGCHAIN 3 "October 1, 1997" "ASIM/LIP6" "MBK LOGICAL FUNCTIONS"
.SH NAME
lofigchain \- creates a netlist in terms of connectors on signals
.so man1/alc_origin.1
.SH SYNOPSIS
.nf
.if n \{\
.ft B \}
.if t \{\
.ft CR \}
#include "mlo.h"
void lofigchain(ptfig)
lofig_list \(**ptfig;
.ft R
.fi
.SH PARAMETER
.TP 20
\fIptfig\fP
Pointer to a lofig_list
.SH DESCRIPTION
The \fBlofigchain\fP function creates the dual representation of natural
mbk netlists. In mbk, netlists are described in terms of signal attached to
connectors.
With \fBlofigchain\fP, one can have the dual sight : connectors attached to
signals.
This can be very useful, depending on the application, but it's also memory
consuming on big netlists, since two views of the same thing are present in
memory at the same time.
.LP
The information resulting of a call to \fBlofigchain\fP is present in the
\fIUSER\fP field of all signals of the figure, accessible through
\fIptfig\->LOSIG\fP. The \fIUSER\fP field has a \fBptype\fP typed
\fILOFIGCHAIN\fP, that points on a \fBchain_list\fP whose \fIDATA\fP points on
each \fBlocon\fP being connected to the given signal.
.SH ERROR
.if n \{\
.ft B \}
.if t \{\
.ft CR \}
"\(**\(**\(** mbk error \(**\(**\(** lofigchain impossible : figure \fIptfig\->NAME\fP is
interface only"
.ft R
.RS
In order to be valid, the netlist resulting of a call to \fBlofigchain\fP must
be done on a figure entirely loaded in ram. See \fBgetlofig\fP for details. 
.RE
.SH EXAMPLE
.ta 3n 6n 9n 12n 15n 18n 21n
.nf
.if n \{\
.ft B \}
.if t \{\
.ft CR \}
#include "mut.h"
#include "mlo.h"
void print_netlist(p)
lofig_list \(**p;
{
losig_list \(**s;
chain_list \(**c;
	lofigchain(p);
	for (s = p\->LOSIG; s; s = s\->NEXT){ 
		(void)fprintf(stdout, "signal : index = %ld name = %s\\n",
				s\->INDEX, getsigname(s));
		c = (chain_list \(**)(getptype(s\->USER, (long)LOFIGCHAIN)\->DATA);
		while (c) {
			fprintf(stdout, "conname : %s\\n",
				(locon_list \(**)(c\->DATA)\->NAME);
			c = c\->NEXT;
		}
	}
}
.ft R
.fi
.SH SEE ALSO
.BR mbk (1),
.BR lofig (3),
.BR locon (3),
.BR losig (3),
.BR getlofig (3),
.BR loadlofig (3).


.so man1/alc_bug_report.1

